Skip to content

fix(docs): correct JSON schema key names and element structure#18

Merged
raphaelmansuy merged 1 commit into
mainfrom
fix/docs-json-schema-accuracy
Mar 24, 2026
Merged

fix(docs): correct JSON schema key names and element structure#18
raphaelmansuy merged 1 commit into
mainfrom
fix/docs-json-schema-accuracy

Conversation

@raphaelmansuy
Copy link
Copy Markdown
Owner

Fixes documentation inaccuracies. elements->kids, page_number->page number, bounding_box->bounding box, heading level values, WASM convert pattern. All 22 tests pass.

…docs

- Replace all underscore keys with space-separated keys (page_number -> 'page number',
  bounding_box -> 'bounding box', heading_level -> 'heading level', font_size -> 'font size')
- Replace 'elements' with 'kids' as the top-level document array field
- Fix heading level values: 'h1'/'title'/'section' -> 'Title'/'Subtitle'/'Heading1-4'
- Fix image field: 'image path' -> 'source'
- Fix list schema: 'items':[strings] -> 'list items':[{type,content,kids}]
- Fix table cell schema: correct type/row number/column number/row span/column span/kids
- Remove 'table' from content filters (tables have no 'content' key)
- Fix WASM docs: replace fictional pages[] structure with convert_to_string()+JSON.parse() pattern
- Safe-access content with .get('content','') for elements that may lack it
@raphaelmansuy raphaelmansuy merged commit 3181586 into main Mar 24, 2026
6 checks passed
@raphaelmansuy raphaelmansuy deleted the fix/docs-json-schema-accuracy branch March 24, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant